/**
 * 数据库表模型
 */

// 测试连接
async function test(server) {
    const { sequelize } = server;
    await sequelize.authenticate();
    console.log('sqlite数据库连接成功')
}

// 同步数据库表模型
async function sync(server) {
    const { sequelize } = server;
    await sequelize.sync({alter: true})
}

export default async (server) => {
    await test(server);
    await sync(server);
}